<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="header.jspf"%>
<style type="text/css">
table {
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	color: brown;
	font-size: 15px;
}

.kong {
	text-align: right;
}

table td {
	padding-top: 12px;
}

#pad {
	padding-left: 140px;
}

.showAnniu {
	color: orange;
	background: white;
	border: none;
}
</style>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/addBook.js"></script>
</head>
<div id="main">
	<h1>新增书籍</h1>
	<div class="content">
		<a href="${pageContext.request.contextPath}/Manger/toManger.do">&nbsp;&nbsp;&nbsp;&nbsp;<input
		class="showAnniu" type="button" value="返回" /></a>
		<center>
			<form action="${pageContext.request.contextPath}/Book/addBook.do"
				method="post" enctype="multipart/form-data"
				onsubmit="return checkName()&&renum()&&repric()">
				<table border="0">
					<tr>
						<td class="kong">书籍类别</td>
						<td width="350"><select name="bookCategory"
							onchange="change()">
								<option>--请选择类别--</option>
								<option value="文学">文学</option>
								<option value="生活">生活</option>
								<option value="科技">科技</option>
								<option value="外语">外语</option>
								<option value="励志">励志</option>
								<option value="少儿">少儿</option>
								<option value="艺术">艺术</option>
								<option value="小说">小说</option>
								<option value="刊期">刊期</option>
								<option value="创意文具">创意文具</option>
						</select></td>
					</tr>
					<tr>
						<td class="kong">书籍名称</td>
						<td><input type="text" name="bookName" id="bn"
							onblur="checkName()" />
							<div style="display: inline;" id="nameee"></div></td>
					</tr>
					<tr>
						<td class="kong">书籍价格</td>
						<td><input type="text" name="bookPrice" id="pric"
							onblur="repric()" />
							<div style="display: inline;" id="errpric"></div></td>
					</tr>
					<tr>
						<td class="kong">书籍数量</td>
						<td><input type="text" name="bookNumber" id="num"
							onblur="renum()" />
							<div style="display: inline;" id="errnum"></div></td>
					</tr>
					<tr>
						<td class="kong">书籍简介</td>
						<td><input type="text" name="bookAbstract" /></td>
					</tr>
					<tr>
						<td class="kong">书籍图片</td>
						<td><input type="file" name="file" /></td>
					</tr>
					<tr>
						<td id="pad" colspan="2"><input class="showAnniu"
							type="submit" /></td>
					</tr>
				</table>
			</form>
		</center>
	</div>
</div>

<%@ include file="footer.jspf"%>
